import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: "/home"
  },
  {
    path: "/home",
    component: () => import("../views/home/Home")

  }, {
    path: "/category",
    component: () => import("../views/category/Category")
  }, {
    path: "/shopcart",
    component: () => import("../views/shopcart/Shopcart")
  },
  {
    path: "/profile",
    component: () => import("../views/profile/Profile")
  },
  {
    path: "/detail",
    component: () => import("../views/detail/Detail"),
    meta: {
      footshow: true   //判断底部导航栏是否显示
    }
  },

]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
